Skip to content

Redact absolute trace_path from public runtime decisions - #18

Merged
ErenAri merged 2 commits into
mainfrom
fix/redact-decision-trace-path
Jun 19, 2026
Merged

Redact absolute trace_path from public runtime decisions#18
ErenAri merged 2 commits into
mainfrom
fix/redact-decision-trace-path

Conversation

@ErenAri

@ErenAri ErenAri commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What

While wiring up "prepared evidence" for the runtime Select/Fetch demo, I found /api/runtime/decisions leaked each record's trace_path — an absolute host path (/var/lib/bpfcompat-demo/runtime-audit/decisions/<id>.json) — to anonymous readers on the public demo. The path isn't retrievable via the API and discloses the server workdir layout.

Fix

  • Strip trace_path from the decisions listing when BPFCOMPAT_API_REDACT_RUNTIME_DETAILS is set (demo posture), consistent with the report sanitizer.
  • trace_path is now omitempty so it drops cleanly.
  • Operators with shell access can still read the audit file directly.

Testing

  • New TestRuntimeDecisionsRedactTracePath (redacted when on, present when off)
  • go test ./internal/api/ ./internal/runtime/ pass; go vet clean

🤖 Generated with Claude Code

ErenAri and others added 2 commits June 19, 2026 14:49
The /api/runtime/decisions listing returned each decision's trace_path -- an
absolute host path to the per-decision audit file (e.g.
/var/lib/bpfcompat-demo/runtime-audit/decisions/<id>.json). That path is not
retrievable via the API and discloses the server's workdir layout to anonymous
readers on the public demo.

Strip trace_path from the listing when BPFCOMPAT_API_REDACT_RUNTIME_DETAILS is
set (the demo posture), consistent with the report sanitizer; operators with
shell access can still read the file directly. Make the field omitempty so it
drops cleanly. Adds a regression test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ErenAri
ErenAri merged commit 4c83619 into main Jun 19, 2026
7 of 8 checks passed
@ErenAri
ErenAri deleted the fix/redact-decision-trace-path branch June 19, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant